﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="ScriptExecutionV2._Default" %>
<%@ Register src="Header.ascx" tagname="Header" tagprefix="uc1" %>
<%@ Register src="Footer.ascx" tagname="Footer" tagprefix="uc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ScriptExecutionV2</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href="Template2.css" rel="stylesheet" type="text/css" media="screen" />
    <style type="text/css">
        .style1
        {
            font-family: "Tempus Sans ITC";
            font-weight: bold;
        }
        #Resultados
        {
            text-align: center;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
   <div id="logo">
	<h1><a href="#">Script Execution V2</a></h1>
</div>
<div id="page">
	<div id="page-bg">
		<div id="content">
        <table >
            <tr>
                <td class="style1">
                    FEBE</td>
                <td rowspan="10">
                    <asp:TextBox ID="txtInput" runat="server" TextMode="MultiLine" Height="337px" 
                        Width="453px"></asp:TextBox>
                    <br />
                    <asp:FileUpload ID="fupImportScript" runat="server" Font-Italic="False" 
                        Font-Names="Tempus Sans ITC" Width="268px" />
                    &nbsp;<asp:Button ID="btnImportar" runat="server" Text="Importar" 
                        onclick="btnImportar_Click" Font-Bold="True" Font-Italic="False" 
                        Font-Names="Tempus Sans ITC" Height="22px" />
                &nbsp;<asp:Button ID="btnExecutar" runat="server" Text="Executar" 
                        onclick="btnExecutar_Click" style="text-align: center" Font-Bold="True" 
                        Font-Italic="False" Font-Names="Tempus Sans ITC" Font-Overline="False" 
                        Font-Strikeout="False" Font-Underline="False" Height="22px" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:DropDownList ID="ddlFebe" runat="server" 
                        DataSourceID="SqlDataSourceFebe" DataTextField="name" DataValueField="name" 
                        Width="200px" Enabled="False">
                    </asp:DropDownList>
                    <asp:CheckBox ID="chkFebe" runat="server" AutoPostBack="True" 
                        oncheckedchanged="chkFebe_CheckedChanged" />
                    <asp:SqlDataSource ID="SqlDataSourceFebe" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionStringFEBE %>" 
                        SelectCommand="SELECT [name] from sys.databases order by name" 
                        UpdateCommand="ASPState_Startup" UpdateCommandType="StoredProcedure">
                    </asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    ARIADNE</td>
            </tr>
            <tr>
                <td>
                    <asp:DropDownList ID="ddlAriadne" runat="server" 
                        DataSourceID="SqlDataSourceAriadne" DataTextField="name" DataValueField="name" 
                        Enabled="False" Width="200px">
                    </asp:DropDownList>
                    <asp:CheckBox ID="chkAriadne" runat="server" AutoPostBack="True" 
                        oncheckedchanged="chkAriadne_CheckedChanged" />
                    <asp:SqlDataSource ID="SqlDataSourceAriadne" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionStringARIADNE %>" 
                        SelectCommand="SCR_GET_BasesDados" SelectCommandType="StoredProcedure">
                    </asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    MENELAU</td>
            </tr>
            <tr>
                <td>
                    <asp:DropDownList ID="ddlMenelau" runat="server" 
                        DataSourceID="SqlDataSourceMenelau" DataTextField="name" DataValueField="name" 
                        Enabled="False" Width="200px">
                    </asp:DropDownList>
                    <asp:CheckBox ID="chkMenelau" runat="server" AutoPostBack="True" 
                        oncheckedchanged="chkMenelau_CheckedChanged" />
                    <asp:SqlDataSource ID="SqlDataSourceMenelau" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionStringMenelau %>" 
                        SelectCommand="SELECT name FROM sys.databases ORDER BY name">
                    </asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    IXIAO</td>
            </tr>
            <tr>
                <td>
                    <asp:DropDownList ID="ddlIxiao" runat="server" 
                        DataSourceID="SqlDataSourceIxiao" DataTextField="name" DataValueField="name" 
                        Enabled="False" Width="200px">
                    </asp:DropDownList>
                    <asp:CheckBox ID="chkIxiao" runat="server" AutoPostBack="True" 
                        oncheckedchanged="chkIxiao_CheckedChanged" />
                    <asp:SqlDataSource ID="SqlDataSourceIxiao" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionStringIXIAO %>" 
                        SelectCommand="SELECT [name] from sys.databases order by name">
                    </asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    ARTEMIS</td>
            </tr>
            <tr>
                <td>
                    <asp:DropDownList ID="ddlArtemis" runat="server" 
                        DataSourceID="SqlDataSourceArtemis" DataTextField="name" DataValueField="name" 
                        Enabled="False" Width="200px">
                    </asp:DropDownList>
                    <asp:CheckBox ID="chkArtemis" runat="server" AutoPostBack="True" 
                        oncheckedchanged="chkArtemis_CheckedChanged" />
                    <asp:SqlDataSource ID="SqlDataSourceArtemis" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionStringArtemis %>" 
                        SelectCommand="SELECT [name] from sys.databases order by name">
                    </asp:SqlDataSource>
                </td>
            </tr>
            </table>
    
    </div>
		<div style="clear: both;">&nbsp;</div>
		
		<div id="Report" style="text-align: center">
            <asp:Label ID="lblReport" runat="server" 
            style="text-align: left" Visible="False" Font-Names="Tempus Sans ITC"></asp:Label>
    </div>
      <div id="Resultados">
          <asp:Panel ID="pnResults" runat="server" Height="200px" ScrollBars="Both" 
              Visible="False">
              <asp:GridView ID="gvResults" runat="server" CellPadding="4" ForeColor="#333333" 
                  GridLines="None" Visible="False">
                  <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                  <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                  <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                  <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                  <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                  <EditRowStyle BackColor="#999999" />
                  <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
              </asp:GridView>
          </asp:Panel>
    </div>
	</div>
</div>
<div id="footer">
	<p>CopyRight @ COFIDIS, All Rights Reserved.</p>
</div>
    </form>
</body>
</html>
